Picture display method and apparatus

ABSTRACT

The present disclosure provides a picture display method and apparatus that relate to the field of image processing and are increase flexibility of picture display and reducing a memory occupation rate of a terminal on the premise of not modifying an attribute of an original picture. The method and apparatus include receiving an instruction for displaying a picture; obtaining, according to an identifier of a to-be-displayed picture included in the instruction, an original bitmap of the to-be-displayed picture and searching, a database of a current device for a pre-stored first rotation angle corresponding to the to-be-displayed picture; adjusting, according to a resolution of a current screen and/or a current window size, a display size of the original bitmap of the to-be-displayed picture, so as to obtain a compressed bitmap of the original bitmap; and displaying, according to the first rotation angle, a compressed bitmap of the original bitmap.

PRIORITY STATEMENT

This application is a continuation under 35 U.S.C. §120 of U.S.application Ser. No. 14/789,035 filed on Jul. 1, 2015, pending, whichclaims the priority benefit of Chinese Patent Application No.201510128185.9 filed on Mar. 23, 2015, both of which are incorporatedherein by reference in their entireties.

BACKGROUND

Technical Field

The present disclosure relates to the field of image processing, and inparticular, to a picture display method and apparatus.

Related Art

When an electronic device, such as a TV, displays a picture withdifferent orientation, the electronic device generally rotate thepicture and resizes the rotated picture into a required resolution. Whena great number of high-definition pictures (for example, a picturehaving high-definition display resolution, such as 4K2K) are rotated anddisplayed at the predetermined resolution, however, a lot of memoryresources of the electronic device would be consumed, and phenomena,such as a pause and a delay, would occur to the electronic device inprocesses of loading a picture and displaying a picture. Here, the 4K2Kis an abbreviation for an ultra high-definition format having a3840×2160 physical resolution.

Currently existing picture display methods have the following defects:

Firstly, the current picture display methods rotate and resize theoriginal picture by modifying an attribute of an original bitmap of thepicture, and the resizing of the original bitmap is conducted after therotation operation; because an original bitmap (also referred to as alattice image) of a picture is constituted by respective pixels, theoriginal bitmap is large and needs to occupy a lot of memory when beingloaded and displayed; in addition, the methods would also modify anattribute of the original bitmap, so that the picture would also bedisplayed on another terminal device according to the modified attributeand size; in view of the above, an attribute of the picture is modifiedaccording to a screen resolution of a current device and a window size,but because the screen resolution of the current device may not be themost optimal, a resolution and a definition of the picture might bereduced, thereby affecting a visual effect for a user.

Secondly, when a user chooses to display a great number of pictures, inthe existing picture display methods, attributes of all original bitmapsneed to modified one by one and sizes of all the original bitmaps needto be adjusted one by one, which would occupy a lot of memory resourcesof a terminal device, thereby exerting negative influence on normalrunning of the terminal device; in addition, because the foregoingoperations would cost a lot of time, the operations seriously shortendisplay time of a picture and reduces user experience.

SUMMARY

Exemplary embodiments of the present disclosure provide a picturedisplay method and apparatus, and increase flexibility of picturedisplay and reduce a memory occupation rate of a terminal on the premiseof not modifying an attribute of an original picture.

The exemplary embodiments of the present disclosure provide a picturedisplay method, including:

receiving an instruction display a picture;

obtaining, according to an identifier of a to-be-displayed pictureincluded in the instruction, an original bitmap of the to-be-displayedpicture and searching a database of a current device for a pre-storedfirst rotation angle corresponding to the to-be-displayed picture; and

adjusting, according to a resolution of a current screen and/or a sizeof a current window, a display size of the original bitmap of theto-be-displayed picture to obtain a compressed bitmap of the originalbitmap; and displaying, according to the found first rotation angle, thecompressed bitmap of the original bitmap.

The exemplary embodiments of the present disclosure further provide apicture display apparatus, including:

an instruction receiving unit, configured to receive an instructiondisplay a picture;

a processing unit, configured to obtain, according to an identifier of ato-be-displayed picture included in the instruction, an original bitmapof the to-be-displayed picture and search a database of a current devicefor a pre-stored first rotation angle corresponding to theto-be-displayed picture; and

an adjusting and displaying unit, configured to adjust, according to aresolution of a current screen and/or a size of a current window, adisplay size of the original bitmap of the to-be-displayed picture toobtain a compressed bitmap of the original bitmap; and display,according to the first rotation angle, the compressed bitmap of theoriginal bitmap.

In view of the foregoing technical solutions, after an instructiondisplay a picture is received, an original bitmap of a to-be-displayedpicture is obtained, and a database of a current device is searched fora pre-stored first rotation angle corresponding to the to-be-displayedpicture; in this way, in the exemplary embodiments of the presentdisclosure, the original bitmap of the to-be-displayed picture is firstcompressed, so as to reduce a size of the to-be-displayed picture, andwhen later it turns out the electronic device needs to perform arotation operation on the to-be-displayed picture, the compressed bitmapis directly rotated, and as compared with a manner of directly rotatingthe original bitmap in the current technology, the exemplary embodimentsof the present disclosure effectively save the memory occupied inprocesses of loading, rotating, and displaying a picture and increasespeeds of loading, rotating, and displaying the picture; further, in theexemplary embodiments of the present disclosure, the compressed bitmapof the original bitmap is rotated according to the first rotation angle,and the picture is displayed after the rotation operation. Hence, therotation operation is performed on the compressed bitmap of the originalbitmap, thereby avoiding phenomenon of consuming a lot of memory as therotation operation is performed on the original bitmap in the currenttechnology. Further, in the exemplary embodiments of the presentdisclosure, the first rotation angle is a parameter for adjusting, onthe basis of a direction of a to-be-displayed picture, a displaydirection of the picture, the first rotation angle is stored in thedatabase of the current device and does not replace an attribute of theto-be-displayed picture, and in this way, no matter how a user rotates adisplay direction of each picture, the attribute of the picture wouldnot be modified, and therefore, an original resolution of the picturewould not be reduced; hence a more flexible picture display method isprovided on the premise of ensuring an original definition andresolution of the picture, thereby improving loading and displayingrates, lowering memory consumption, and reducing a memory occupationrate.

BRIEF DESCRIPTION OF THE DRAWINGS

To illustrate the technical solutions in the exemplary embodiments ofthe present disclosure more clearly, the accompanying drawings fordescribing the embodiments are introduced briefly below. Apparently, theaccompanying drawings in the following description are only exemplaryembodiments of the present disclosure, and persons of ordinary skill inthe art can derive other drawings from the accompanying drawings withoutcreative efforts.

FIG. 1 is a flowchart of a picture display method according to anexemplary embodiment of the present disclosure;

FIG. 2 is a flowchart of a picture rotation method for a picture that isnot displayed according to an exemplary embodiment of the presentdisclosure;

FIG. 3 is a flowchart of an image display method according to anexemplary embodiment of the present disclosure;

FIG. 4 is a flowchart of an image rotation method for a picture that isnot displayed according to an exemplary embodiment of the presentdisclosure;

FIG. 5 is a flowchart of a method for generating or updating a thumbnailaccording to an exemplary embodiment of the present disclosure;

FIG. 6 is a flowchart of a picture display apparatus according to anexemplary embodiment of the present disclosure; and

FIG. 7 is a schematic diagram illustrating an exemplary embodiment of anelectronic device.

DETAILED DESCRIPTION

To illustrate technology improvements, technical solutions, andadvantages of the exemplary embodiments of the present disclosureclearer, the present disclosure is further described below in detailwith reference to the accompanying drawings. Apparently, the describedexemplary embodiments are a part rather than all of the embodiments ofthe present disclosure. All other embodiments obtained by a person ofordinary skill in the art based on the embodiments of the presentdisclosure without creative efforts shall fall within the protectionscope of the present disclosure.

Embodiments of the present disclosure are applicable to different typesof intelligent terminals and in particular, to terminal devices, such assmart phones and a smart TV, that are developed based on an Androidsystem. The exemplary embodiments of the present disclosure provide aflexible and efficient fast synchronization method for image display anda thumbnail. The embodiments of the present disclosure propose an imagerotation algorithm based on a current window; in addition, during imagedisplay, an angle is uniformly stored and managed in a database of acurrent device (for example, an intelligent terminal or a smart TV),once the database of the current device is removed, an image isdisplayed at an angle defined by an attribute thereof, so that rotationof the image is only based on the current device, and when the image isopened in another device, the image is displayed at the angle defined bythe attribute of the another device; generally speaking, during an imagerotation process, the image may be stretched according to a currentscreen, thereby reducing a resolution of the image; however, theembodiments of the present disclosure do not modify the angle in theattribute of the image, so as to provide a more flexible image rotationmethod while ensuring a resolution of the image at the same time.Meanwhile, in the embodiments of the present disclosure, the originalbitmap of the to-be-displayed picture is first compressed, so as toreduce a size of the to-be-displayed picture, and when later it isnecessary to perform a rotation operation on the to-be-displayedpicture, the compressed bitmap is directly rotated, and as compared witha manner of directly rotating the original bitmap in the currenttechnology, the embodiments of the present disclosure effectively savethe memory occupied in processes of loading, rotating, and displaying apicture, and increase speeds of loading, rotating, and displaying thepicture. In addition, based on the foregoing rotation solution, theembodiments of the present disclosure further propose a fastsynchronization method for an image thumbnail, thereby avoiding atime-consuming operation of obtaining a thumbnail again.

It should be noted that in the embodiments of the present disclosure, abitmap means a manner that a converted picture is saved in a terminal.Thus the bitmap in the embodiments of the present disclosure is a bitmapin the code of a picture rather than a picture of a certain type. Itshould also be noted that the embodiments of the present disclosure maybe applied to pictures in various formats.

FIG. 7 is a schematic diagram illustrating an exemplary embodiment of anelectronic device. The electronic device may include apparatuses toexecute methods and software systems introduced in the presentdisclosure. An electronic device 700 may be a computing device capableof executing a software system. The electronic device 700 may, forexample, be a device such as a smart TV, a personal desktop computer ora portable device, such as a laptop computer, a tablet computer, acellular telephone, or a smart phone.

The electronic device 700 may vary in terms of capabilities or features.Claimed subject matter is intended to cover a wide range of potentialvariations. For example, the electronic device 700 may include a networkinterface 750, an audio interface 752, and a keypad/keyboard 756. It mayalso include a display 754, such as a liquid crystal display (LCD), or adisplay with a high degree of functionality, such as a touch-sensitivecolor 2D or 3D display. In contrast, however, as another example, aweb-enabled electronic device 700 may include one or more physical orvirtual keyboards, and mass storage medium 730.

The electronic device 700 may also include or may execute a variety ofoperating systems 741, including an operating system. The electronicdevice 700 may include or may execute a variety of possible applications742, such as an electronic game 745. An application 742 may enablecommunication with other devices via a network, such as communicatingwith another computer via a network for online.

Further, the electronic device 700 may include one or morenon-transitory processor-readable storage media 730 and one or moreprocessors 722 in communication with the non-transitoryprocessor-readable storage media 730. For example, the non-transitoryprocessor-readable storage media 730 may be a RAM memory, flash memory,ROM memory, EPROM memory, EEPROM memory, registers, hard disk, aremovable disk, a CD-ROM, or any other form of non-transitory storagemedium known in the art. The one or more non-transitoryprocessor-readable storage media 730 may store sets of instructions, orunits and/or modules that include the sets of instructions, forconducting operations and/or method steps described in the presentdisclosure. Alternatively, the units and/or modules may be hardwaredisposed in the electronic device 700 configured to conduct operationsand/or method steps described in the present disclosure. The one or moreprocessors may be configured to execute the sets of instructions andperform the methods and/or operations in example embodiments of thepresent disclosure.

Merely for illustration, only one processor will be described inelectronic devices that execute operations and/or method steps in thefollowing example embodiments. However, it should be note that theelectronic devices in the present disclosure may also include multipleprocessors, thus operations and/or method steps that are performed byone processor as described in the present disclosure may also be jointlyor separately performed by the multiple processors. For example, if inthe present disclosure a processor of an electronic device executes bothstep A and step B, it should be understood that step A and step B mayalso be performed by two different processors jointly or separately inthe electronic device (e.g., the first processor executes step A and thesecond processor executes step B, or the first and second processorsjointly execute steps A and B).

FIG. 1 is a flowchart of a picture display method according to anexemplary embodiment of the present disclosure, and as shown in FIG. 1,the process may be executed by an electronic device, such as a smart TV,and may include:

Step 11: Receiving an instruction to display a picture.

Step 12: Obtaining, according to an identifier of a to-be-displayedpicture included in the instruction, an original bitmap of theto-be-displayed picture and searching a database of a current device fora pre-stored first rotation angle corresponding to the to-be-displayedpicture.

Step 13: Adjusting, according to a resolution of a current screen and/ora size of a current window, a display size of the original bitmap of theto-be-displayed picture to obtain a compressed bitmap of the originalbitmap.

Step 14: Displaying, according to the first rotation angle, thecompressed bitmap of the original bitmap.

In the foregoing steps 11 to 14, the first rotation angle of the pictureis stored or updated through the following steps: for a picture that hasbeen displayed, after receiving a rotation instruction to adjust asecond rotation angle of the picture that has been displayed, updating,according to a sum of the first rotation angle and second rotation angleof the image, the first rotation angle corresponding to the image in thedatabase of the current device; for a picture that is not displayed,after receiving a rotation instruction to adjust a second rotation angleof the picture that is not displayed, searching the database of thecurrent device for a pre-stored first rotation angle corresponding tothe picture, and updating, according to a sum of the first rotationangle and second rotation angle of the picture, the first rotation anglecorresponding to the picture in the database of the current device.

The foregoing step 14 may include performing, according to a calculateddisplay angle, a picture rotation operation on the compressed bitmap ofthe original bitmap; adjusting, according to the resolution of thecurrent screen and/or the size of the current window, a display size ofthe compressed bitmap of the original bitmap after the rotationoperation, so as to obtain an adaptive window bitmap; and displaying theadaptive window bitmap.

The foregoing steps 11 to 13 may include, on the basis of an originalbitmap of each picture and a preset scaling ratio, generating, accordingto a first rotation angle of each picture in the database of the currentdevice, a thumbnail of each picture and saving the generated thumbnailin a pre-established picture cache.

The foregoing steps 11 to 13 may include obtaining, when it is necessaryto display a thumbnail of a picture, the thumbnail of the picture fromthe picture cache and display the thumbnail of the picture.

The exemplary embodiments of the present disclosure are described indetail below.

The image display method according to the exemplary embodiment of thepresent disclosure may include an image rotation process, an imagestretching process, an image display process, and a thumbnail update anddisplay process. The exemplary embodiment of the present disclosureprovides a novel image rotation manner, so as to implement rotation ofan image only in a current display device without modifying an angle inan attribute of the image, thereby effectively preventing the image frombeing damaged during a use process; because the rotation of the image isno longer based on the original image per se, but based on a currentwindow image, memory consumption of the rotation operation is ensured tobe small; in addition, in the exemplary embodiment of the presentdisclosure, thumbnails of respective images may be uniformly stored in apicture cache LruCache, and after a rotation operation is performed, theangle after the rotation is used to rotate the thumbnails in theLruCache, so as to avoid obtaining original images again, therebyimplement fast synchronization of the thumbnails. In view of the above,the exemplary embodiment of the present disclosure not only increasesflexibility of image display and display, but also can protect anattribute of an image and ensure that a resolution of an originalpicture is not damaged, thereby improving a running speed of a currentdisplay end and reducing a memory occupation rate.

FIG. 2 is a flowchart of a picture rotation method for a picture that isnot displayed according to an exemplary embodiment of the presentdisclosure, where the exemplary embodiment of the present disclosure isdescribed by using an example in which a smart TV serves as a currentdisplay device, and as shown in FIG. 2, the process may include:

Step 21: A smart TV receives a rotation instruction to adjust a secondrotation angle of a picture that is not displayed.

Step 22: The smart TV searches a database of a current device for apre-stored first rotation angle corresponding to the picture that is notdisplayed.

For example, the first rotation angle of a picture that is not rotatedmay be set to 0° by default.

Step 23: The smart TV updates, according to a sum of the first rotationangle and the second rotation angle of the picture, the first rotationangle corresponding to the image in the database of the current device.

After image rotation is performed on the picture that is not displayed,execution of the image display method according to the exemplaryembodiment of the present disclosure may be continued. FIG. 3 is aflowchart of an image display method according to an exemplaryembodiment of the present disclosure, and as shown in FIG. 3, theprocess may include:

Step 31: A smart TV receives an instruction display a picture.

Step 32: The smart TV obtains, according to an identifier of ato-be-displayed picture included in the instruction, an original bitmapof the to-be-displayed picture.

For example, the smart TV may execute the following code for displayingan image:

mPictureOrientation=mCursor.getInt(mCursor.getColumnIndex(MediaDataContract.Media.Columns.ORIENTATION));where mCursor includes information related to the image and obtainedfrom a database of a current device (e.g., the smart TV).

Step 33: The smart TV searches a database of the current device for apre-stored first rotation angle corresponding to the to-be-displayedpicture.

Step 34: The smart TV adjusts, according to a resolution of a currentscreen and/or a size of a current display window on the current screen,a display size of the original bitmap of the to-be-displayed picture toobtain a compressed bitmap of the original bitmap.

Step 35: The smart TV calculates, according to the first rotation angle,a display angle of the to-be-displayed picture on the current screen.

For example, the smart TV may execute the following code for calculatinga display angle:

int rotatedDegree= mPictureOrientation + (mRotateFactor % 4) * 90; intnewOrientation = rotated Degree% 360; if (newOrientation < 0) {newOrientation = (4 − Math.abs(rotatedDegree / 90)) * 90; }where mRotateFactor is a rotating factor and is increased by 1 if a keyis pressed clockwise once.

Step 36: The smart TV displays, according to the calculated displayangle, the compressed bitmap of the original bitmap.

For example, the smart TV may execute the following code for displayingthe compressed bitmap:

matrix.postRotate(rotatedDegree);

newBmp=Bitmap.createBitmap(bitmap, 0, 0, w, h, matrix, true);

view.setAdjustViewBounds(true);

view.setMaxWidth(mDisplayWidth);

view.setMaxHeight(mDisplayHeight>h? mDisplayHeight: h);

view.setImageBitmap(newBmp);

where bitmap is a bitmap of the current window image, matrix is a Matrixobject, w and h are a resolution of a display, and view is ImageView fordisplaying the image.

It should be noted that the foregoing code only serves as animplementation manner of the exemplary embodiment of the presentdisclosure, and other implementation manners that can implement the samefunction all fall within the protection scope of the exemplaryembodiment of the present disclosure.

After the image is displayed, execution of the image rotation methodaccording to the exemplary embodiment of the present disclosure may becontinued. FIG. 4 is a flowchart of an image rotation method for apicture that has been displayed according to an exemplary embodiment ofthe present disclosure, where the exemplary embodiment of the presentdisclosure is described by using an example in which a smart TV servesas a current display end, and as shown in FIG. 4, the process mayinclude:

Step 41: A smart TV receives a rotation instruction to adjust a secondrotation angle of a picture that has been displayed.

For example, the picture that has been displayed may be a picture thatis completely displayed at a calculated display angle, where the displayangle may be the display angle calculated in the foregoing step 35.

Step 42: The smart TV updates, according to a sum of the first rotationangle and second rotation angle of the picture, the first rotation anglecorresponding to the image in the database of the current device.

For example, in the foregoing step 23 and the foregoing step 42, a codefor updating the corresponding first rotation angle in the database ofthe current device may be:

ContentResolver cr=Activity.this.getContentResolver( )

ContentValues cv=new ContentValues(1);

cv.put(MediaDataContract.Media.Columns.ORIENTATION, newOrientation);

cr.update(uri, cv, null, null);

where uri is an identifier of the current image.

It should be noted that the foregoing code only serves as animplementation manner of the exemplary embodiment of the presentdisclosure, and other implementation manners that can implement the samefunction all fall within the protection scope of the exemplaryembodiment of the present disclosure.

In any one of the foregoing step 21 to step 42, the smart TV generatesor updates a thumbnail of each picture. FIG. 5 is a flowchart of amethod for generating or updating a thumbnail according to an exemplaryembodiment of the present disclosure, and as shown in FIG. 5, theprocess may include:

Step 51: The smart TV calculates, according to an original bitmap ofeach picture and a first rotation angle of each picture in a database ofa current device, a display angle of each picture on a current screen.

Step 52: Generate, according to a preset scaling ratio and the displayangle of each picture, a thumbnail of each picture and save thegenerated thumbnail in a pre-established picture cache.

Step 53: Obtain, when it is necessary to display a thumbnail of apicture, the thumbnail of the picture from the picture cache and displaythe thumbnail of the picture.

For example, a code for implementing a thumbnail cache mechanismaccording to the exemplary embodiment of the present disclosure may be:

public void addBitmapToMemoryCache(Uri key, Bitmap bitmap) {mMemoryCache.put(key, bitmap); } public Bitmap getBitmapFromMemCache(Urikey) { return mMemoryCache.get(key); } public voidremoveBitmapFromMemoryCache(Uri key) { mMemoryCache.remove(key); }where mMemoryCache is an LruCache<Uri, Bitmap>object.

It should be noted that the foregoing code only serves as animplementation manner of the exemplary embodiment of the presentdisclosure, and other implementation manners that can implement the samefunction all fall within the protection scope of the exemplaryembodiment of the present disclosure.

In view of the foregoing technical solutions, after an instructiondisplay a picture is received, an original bitmap of a to-be-displayedpicture is obtained, and a database of a current device is searched fora pre-stored first rotation angle corresponding to the to-be-displayedpicture; in the exemplary embodiments of the present disclosure, theoriginal bitmap of the to-be-displayed picture is first compressed, soas to reduce a size of the to-be-displayed picture, and when later itturns out the electronic device needs to perform a rotation operation onthe to-be-displayed picture, the compressed bitmap is directly rotated,and as compared with a manner of directly rotating the original bitmapin the current technology, the exemplary embodiments of the presentdisclosure effectively save the memory occupied in processes of loading,rotating, and displaying a picture and increase speeds of loading,rotating, and displaying the picture; further, in the exemplaryembodiments of the present disclosure, the compressed bitmap of theoriginal bitmap is rotated according to initial direction information ofthe to-be-displayed picture and the first rotation angle, and thepicture is displayed after the rotation operation. Hence, the rotationoperation is performed on the compressed bitmap of the original bitmap,thereby avoiding phenomenon of consuming a lot of memory as the rotationoperation is performed on the original bitmap in the current technology.Further, in the exemplary embodiments of the present disclosure, thefirst rotation angle is a parameter for adjusting, on the basis of adirection of a to-be-displayed picture, a display direction of thepicture, the first rotation angle is stored in the database of thecurrent device and does not replace an attribute of the to-be-displayedpicture, and in this way, no matter how a user rotates a displaydirection of each picture, the attribute of the picture would not bemodified, and therefore, an original resolution of the picture would notbe reduced; hence a more flexible picture display method is provided onthe premise of ensuring an original definition and resolution of thepicture, thereby improving a displaying rate, lowering memoryconsumption, and reducing a memory occupation rate.

On the basis of the same technical concept, FIG. 6 is a flowchart of apicture display apparatus according to an exemplary embodiment of thepresent disclosure, and as shown in FIG. 6, the apparatus specificallyincludes:

an instruction receiving unit 61, configured to receive an instructiondisplay a picture;

a processing unit 62, configured to obtain, according to an identifierof a to-be-displayed picture included in the instruction, an originalbitmap of the to-be-displayed picture and search a database of a currentdevice for a pre-stored first rotation angle corresponding to theto-be-displayed picture; and

an adjusting and displaying unit 63, configured to adjust, according toa resolution of a current screen and/or a size of a current window, adisplay size of the original bitmap of the to-be-displayed picture toobtain a compressed bitmap of the original bitmap; and display,according to the first rotation angle, the compressed bitmap of theoriginal bitmap.

The apparatus further includes:

a database maintaining unit, configured to update, for a picture thathas been displayed, the first rotation angle corresponding to thepicture in the database of the current device after receiving a rotationinstruction to adjust a second rotation angle of the picture that hasbeen displayed according to a sum of the first rotation angle and secondrotation angle of the picture; search, for a picture that is notdisplayed, the database of the current device for a pre-stored firstrotation angle corresponding to the picture after receiving a rotationinstruction to adjust a second rotation angle of the picture that is notdisplayed, and update, according to a sum of the first rotation angleand second rotation angle of the picture, the first rotation anglecorresponding to the picture in the database of the current device.

The adjusting and displaying unit 63 is further configured to perform,according to a calculated display angle, on a picture rotation operationthe compressed bitmap of the original bitmap; adjust, according to theresolution of the current screen and/or the size of the current window,a display size of the compressed bitmap of the original bitmap after therotation operation, so as to obtain an adaptive window bitmap; anddisplay the adaptive window bitmap.

The apparatus further includes:

a thumbnail processing unit, configured to, on the basis of an originalbitmap of each picture and a preset scaling ratio, generate, accordingto a first rotation angle of each picture in the database of the currentdevice, a thumbnail of each picture and save the generated thumbnail ina pre-established picture cache.

The thumbnail processing unit is further configured to obtain, when itis necessary to display a thumbnail of a picture, the thumbnail of thepicture from the picture cache and display the thumbnail of the picture.

The present disclosure is described with reference to the method anddevice (system) according to exemplary embodiments of the presentdisclosure, and flowcharts and/or block diagrams of a computer programproduct. It should be understood that each procedure and/or block in theflowcharts and/or block diagrams, and a combination of a procedureand/or block in the flowcharts and/or block diagrams may be implementedby computer program instructions. The computer program instructions maybe provided for a processor of a general-purpose computer, a dedicatedcomputer, a built-in processor, or another programmable data processingdevice to generate a machine, so that an instruction executed by aprocessor of a computer or another programmable data processing devicegenerates an apparatus for implementing a function specified in one or aplurality of procedures in the flowcharts and/or one or a plurality ofblocks in the block diagrams.

The computer program instructions may also be stored in a computerreadable memory that can guide a computer or another programmable dataprocessing device to work in a specified manner, so that theinstructions stored in the computer readable memory generate a productincluding an instruction apparatus, where the instruction apparatusimplements a function specified in one or a plurality of procedures inthe flowcharts and/or one or a plurality of blocks in the blockdiagrams.

The computer program instructions may also be installed to a computer oranother programmable data processing device, so that a serials ofoperation steps are performed in the computer or the anotherprogrammable device to generate processing implemented by the computer.In this way, an instruction executed in the computer or the anotherprogrammable device provides a step for implementing a functionspecified in one or a plurality of procedures in the flowcharts and/orone or a plurality of blocks in the block diagrams.

Though exemplary embodiments of the present disclosure are described, aperson skilled in the art can make changes and modifications to theembodiments once knowing basic creative concepts. Therefore, theaccompanying claims intend to be construed as including the exemplaryembodiments and all changes and modifications falling within the scopeof the present disclosure.

Obviously, a person skilled in the art may make various modificationsand variations of the present disclosure without departing from thespirit and scope of the present disclosure. Therefore, the presentdisclosure intends to include the modifications and variations if themodifications and variations of the present disclosure fall within thescope of the claims of the present disclosure and equivalenttechnologies.

What is claimed is:
 1. A method for displaying a target picture, themethod comprising: loading, by an electronic device, an original bitmapof a target picture; searching, by the electronic device, a databasestored in the electronic device for a first rotation angle correspondingto the target picture, wherein the database is separate from the targetpicture; and displaying, by the electronic device, the original bitmapaccording to the first rotation angle.
 2. The method according to claim1, wherein the displaying, by the electronic device, the original bitmapaccording to the first rotation angle comprises: before searching thedatabase for the first rotation angle, adjusting, by the electronicdevice, a display size of the original bitmap of the target pictureaccording to a resolution of a screen of the electronic device or aresolution of a display window on the screen of the electronic device,to obtain a compressed bitmap; and displaying, by the electronic device,the compressed bitmap according to the first rotation angle.
 3. Themethod according to claim 2, wherein the displaying, by the electronicdevice, the compressed bitmap according to the first rotation anglecomprises: rotating, by the electronic device, the compressed bitmapaccording to the first rotation angle, to obtain a rotated compressedbitmap; adjusting, by the electronic device, a display size of therotated compressed bitmap according to the resolution of the screen ofthe electronic device or the resolution of the display window on thescreen of the electronic device, to obtain an adaptive window bitmap;and displaying, by the electronic device, the adaptive window bitmap. 4.The method according to claim 1, wherein the displaying, by theelectronic device, the original bitmap according to the first rotationangle comprises: after searching the database for the first rotationangle, adjusting, by the electronic device, a display size of theoriginal bitmap of the target picture according to a resolution of ascreen of the electronic device or a resolution of a display window onthe screen of the electronic device, to obtain a compressed bitmap; anddisplaying, by the electronic device, the compressed bitmap according tothe first rotation angle.
 5. The method according to claim 4, whereinthe displaying, by the electronic device, the compressed bitmapaccording to the first rotation angle comprises: rotating, by theelectronic device, the compressed bitmap according to the first rotationangle, to obtain a rotated compressed bitmap; adjusting, by theelectronic device, a display size of the rotated compressed bitmapaccording to the resolution of the screen of the electronic device orthe resolution of the display window on the screen of the electronicdevice, to obtain an adaptive window bitmap; and displaying, by theelectronic device, the adaptive window bitmap.
 6. The method accordingto claim 1, wherein the searching, by the electronic device, thedatabase stored in the electronic device for the first rotation anglecorresponding to the target picture further comprises: when the firstrotation angle corresponding to the target picture is not found in thedatabase stored in the electronic device, setting the first rotationangle to 0°.
 7. The method according to claim 1, the method furthercomprising: receiving, by the electronic device, a rotation instructionto adjust the target picture with a second rotation angle; determining,by the electronic device, a summation of the first rotation angle andthe second rotation angle; setting, by the electronic device, the firstrotation angle to the summation; and updating, by the electronic device,the database stored in the electronic device with the first rotationangle corresponding to the target picture.
 8. The method according toclaim 1, further comprising: generating, by the electronic device, athumbnail of the target picture according to the first rotation angleand based on the original bitmap and a preset scaling ratio; and saving,by the electronic device, the thumbnail in a pre-established picturecache of the electronic device.
 9. The method according to claim 8,further comprising: loading, by the electronic device, the thumbnail ofthe target picture from the pre-established picture cache; anddisplaying, by the electronic device, the thumbnail of the targetpicture.
 10. An electronic apparatus for displaying a target picture,comprising: a memory storing a set of instructions; and a processor incommunication with the memory, wherein, when the processor executes theset of instructions, the processor is configured to cause the electronicapparatus to: load an original bitmap of a target picture; search adatabase stored in the electronic apparatus for a first rotation anglecorresponding to the target picture, wherein the database is separatefrom the target picture; and display the original bitmap according tothe first rotation angle.
 11. The electronic apparatus according toclaim 10, wherein the processor, when executing the set of instructionsto cause the electronic apparatus to display the original bitmapaccording to the first rotation angle, is configured to cause theelectronic apparatus to: before the processor is configured to cause theelectronic apparatus to search the database for the first rotationangle, adjust, according to a resolution of a screen of the electronicapparatus or a resolution of a display window on the screen of theelectronic apparatus, a display size of the original bitmap of thetarget picture to obtain a compressed bitmap; and display the compressedbitmap according to the first rotation angle.
 12. The electronicapparatus according to claim 11, wherein the processor, when executingthe set of instructions to cause the electronic apparatus to display thecompressed bitmap according to the first rotation angle, is configuredto cause the electronic apparatus to: rotate the compressed bitmapaccording to the first rotation angle, to obtain a rotated compressedbitmap; adjust, according to the resolution of the screen of theelectronic apparatus or the resolution of the display window on thescreen of the electronic apparatus, a display size of the rotatedcompressed bitmap, to obtain an adaptive window bitmap; and display theadaptive window bitmap.
 13. The electronic apparatus according to claim10, wherein the processor, when executing the set of instructions tocause the electronic apparatus to display the original bitmap accordingto the first rotation angle, is configured to cause the electronicapparatus to: after the processor is configured to cause the electronicapparatus to search the database for the first rotation angle, adjust,according to a resolution of a screen of the electronic apparatus or aresolution of a display window on the screen of the electronicapparatus, a display size of the original bitmap of the target pictureto obtain a compressed bitmap; and display the compressed bitmapaccording to the first rotation angle.
 14. The electronic apparatusaccording to claim 13, wherein the processor, when executing the set ofinstructions to cause the electronic apparatus to display the compressedbitmap according to the first rotation angle, is configured to cause theelectronic apparatus to: rotate the compressed bitmap according to thefirst rotation angle, to obtain a rotated compressed bitmap; adjust,according to the resolution of the screen of the electronic apparatus orthe resolution of the display window on the screen of the electronicapparatus, a display size of the rotated compressed bitmap, to obtain anadaptive window bitmap; and display the adaptive window bitmap.
 15. Theelectronic apparatus according to claim 10, wherein the processor, whenexecuting the set of instructions to cause the electronic apparatus tosearch the database stored in the electronic apparatus for the firstrotation angle corresponding to the target picture, is furtherconfigured to cause the electronic apparatus to: when the first rotationangle corresponding to the target picture is not found in the databasestored in the electronic apparatus, set the first rotation angle to 0°.16. The electronic apparatus according to claim 10, wherein theprocessor, when executing the set of instructions, is further configuredto cause the electronic apparatus to: receive a rotation instruction toadjust the target picture with a second rotation angle; determine asummation of the first rotation angle and the second rotation angle; setthe first rotation angle to the summation; and update the databasestored in the electronic apparatus with the first rotation anglecorresponding to the target picture.
 17. The electronic apparatusaccording to claim 10, wherein the processor, when executing the set ofinstructions, is further configured to cause the electronic apparatusto: generate a thumbnail of the target picture according to the firstrotation angle and based on the original bitmap and a preset scalingratio; and save the thumbnail in a pre-established picture cache of theelectronic apparatus.
 18. The electronic apparatus according to claim17, wherein the processor, when executing the set of instructions, isfurther configured to cause the electronic apparatus to: load thethumbnail of the target picture from the pre-established picture cache;and display the thumbnail of the target picture.
 19. A non-transitoryprocessor-readable storage medium having a set of instructions storedthereon, wherein the set of instructions, when executed by a processorof an electronic device, instructs the processor to cause the electronicdevice to perform actions comprising: loading an original bitmap of atarget picture; searching a database stored in the electronic device fora first rotation angle corresponding to the target picture, wherein thedatabase is separate from the target picture; and displaying theoriginal bitmap according to the first rotation angle.
 20. Thenon-transitory processor-readable storage medium according to claim 19,wherein the displaying the original bitmap according to the firstrotation angle comprises: before the searching the database for thefirst rotation angle, adjusting a display size of the original bitmap ofthe target picture according to a resolution of a screen of theelectronic device or a resolution of a display window on the screen ofthe electronic device, to obtain a compressed bitmap; and displaying thecompressed bitmap according to the first rotation angle.
 21. Thenon-transitory processor-readable storage medium according to claim 20,wherein the displaying the compressed bitmap according to the firstrotation angle comprises: rotating the compressed bitmap according tothe first rotation angle, to obtain a rotated compressed bitmap;adjusting a display size of the rotated compressed bitmap according theresolution of the screen of the electronic device or the resolution ofthe display window on the screen of the electronic device, to obtain anadaptive window bitmap; and displaying the adaptive window bitmap. 22.The non-transitory processor-readable storage medium according to claim19, wherein the displaying the original bitmap according to the firstrotation angle comprises: after the searching the database for the firstrotation angle, adjusting a display size of the original bitmap of thetarget picture according to a resolution of a screen of the electronicdevice or a resolution of a display window on the screen of theelectronic device, to obtain a compressed bitmap; and displaying thecompressed bitmap according to the first rotation angle.
 23. Thenon-transitory processor-readable storage medium according to claim 22,wherein the displaying the compressed bitmap according to the firstrotation angle comprises: rotating the compressed bitmap according tothe first rotation angle, to obtain a rotated compressed bitmap;adjusting a display size of the rotated compressed bitmap according theresolution of the screen of the electronic device or the resolution ofthe display window on the screen of the electronic device, to obtain anadaptive window bitmap; and displaying the adaptive window bitmap. 24.The non-transitory processor-readable storage medium according to claim19, wherein the searching the database stored in the electronic devicefor the first rotation angle corresponding to the target picture furthercomprises: when the first rotation angle corresponding to the targetpicture is not found in the database stored in the electronic device,setting the first rotation angle to 0°.
 25. The non-transitoryprocessor-readable storage medium according to claim 19, wherein the setof instructions, when executed by the processor of the electronicdevice, further instructs the processor to cause the electronic deviceto perform actions comprising: receiving a rotation instruction toadjust the target picture with a second rotation angle; determining asummation of the first rotation angle and the second rotation angle;setting the first rotation angle to the summation; and updating thedatabase stored in the electronic device with the first rotation anglecorresponding to the target picture.
 26. The non-transitoryprocessor-readable storage medium according to claim 19, wherein the setof instructions, when executed by the processor of the electronicdevice, further instructs the processor to cause the electronic deviceto perform actions comprising: generating a thumbnail of the targetpicture according to the first rotation angle and based on the originalbitmap and a preset scaling ratio; and saving the thumbnail in apre-established picture cache of the electronic device.
 27. Thenon-transitory processor-readable storage medium according to claim 26,wherein the set of instructions, when executed by the processor of theelectronic device, further instructs the processor to cause theelectronic device to perform actions comprising: loading the thumbnailof the target picture from the pre-established picture cache; anddisplaying the thumbnail of the target picture.